<!-- 页面 -->
<template>
	<s-layout navbar="custom">
		<view class="page-bg">
			<view class="uni-con">
				<view class="uni-flex uni-row">
					<view class="uni-flex uni-row">
					<image class="user-photo" :src=state.kcgw.my_photo mode="aspectFit"></image>
					</view>
					<view class="chat-box">
						<text class="my-teacher">我是【{{state.kcgw.my_name}}】考试辅导老师</text>
						<text class="my-teacher-tip">累计助力{{state.kcgw.my_stu}}名莘莘学子考试通关</text>
					</view>
				</view>
			</view>

			<view class="">
				<uni-card class="gw-title" :is-shadow="false" :border="false" style="border-radius: 13px;">
					<text class="solog">
				添加我的微信<br>
				免费为您提供以下专业服务
				</text>
				
				<uni-list>
					<uni-list-item title="做题百胜技巧" note="高频考题、记忆口诀、做题思路点拨"
										thumb="/static/images/gw-1.png"
										thumb-size="lg"
										 style="min-height: 60px; margin: 20px 0 10px 0; border-radius: 9px; background-color: #fff7ec; border: 1px #fde8b7 solid;"
										 />
					<uni-list-item title="学习规划" note="高频考题、记忆口诀、做题思路点拨"
										thumb="/static/images/gw-2.png"
										thumb-size="lg"
										 style=" min-height: 60px; margin: 20px 0 10px 0; border-radius: 9px; background-color: #f3f8fe; border: 1px #b2d5fc solid;"
										 />
					<uni-list-item title="高效备考" note="高频考题、记忆口诀、做题思路点拨"
										thumb="/static/images/gw-3.png"
										thumb-size="lg"
										 style=" min-height: 60px; margin: 20px 0 10px 0; border-radius: 9px; background-color: #f9f7fe; border: 1px #dedbfd solid;"
										 />					 
					<uni-list-item title="资料礼包" note="高频考题、记忆口诀、做题思路点拨"
										thumb="/static/images/gw-4.png"
										thumb-size="lg"
										 style=" min-height: 60px; margin: 20px 0 10px 0; border-radius: 9px; background-color: #f6fcfc; border: 1px #cbebe4 solid;"
										 />	
														  
					<uni-list-item title="长按识别二维码" note="开启你的定制化学习之旅"
									style="min-height: 60px; margin: 20px 0 10px 0; border-radius: 9px; background-color: #f5f5f5; border: 1px #d3d3d3 solid;"
										 >
					 <template v-slot:body>
						 <view class="con-body">
							 <span class="con-title">长按识别二维码</span>
							 <span class="con-note">开启你的定制化学习之旅</span>
							 <span class="con-note2">已通过安全认证 可放心添加</span>
						 </view>
						
						
					</template>
						<template v-slot:footer>
							<image class="slot-image" src="/static/images/gw-5.png" mode="widthFix"></image>
						</template>	
						
					</uni-list-item>					 
					</uni-list>
				
				
					
				</uni-card>
			</view>


		</view>
	</s-layout>
</template>

<script setup>
	import {
		computed,
		reactive
	} from 'vue';
	import {
		onLoad,
		onReachBottom,
		onPullDownRefresh
	} from '@dcloudio/uni-app';
	import {
		formatOrderColor
	} from '@/sheep/hooks/useGoods';
	import sheep from '@/sheep';
	import _ from 'lodash';
	import {
		isEmpty
	} from 'lodash';
	import HMfilterDropdown from '@/sheep/components/HM-filterDropdown/HM-filterDropdown.vue';

	const tradeManaged = computed(() => sheep.$store('app').has_wechat_trade_managed);


	// 数据
	const state = reactive({
		tikuList: [],
		loadStatus: '',
		kcgw:{
			"my_stu":"204",
			"my_name":"一级造价工程师",
			"my_photo":"/static/images/user_photo.png"
		}
		
	});



	// 订单详情
	function onOpenlesson(goodsId, content_type) {

		sheep.$router.go('/pages/course/lesson', {
			'goodsId': goodsId,
		});
	}

	// 获取题库列表
	async function getTikuList() {
		state.loadStatus = 'loading';
		let res = await sheep.$api.tiku.lists({
			category_id: 1
		});
		state.error = res.error;
		if (res.code === 1) {
			console.log(res)
			state.tikuList = res.data;
		}
	}

	function confirmCate(e) {
		//根据第一个选择变更第二个
		if (e.value[0][0] != null && e.value[1][0] === null && e.value[2][0] === null) {
			sheep.$api.tiku.getcategorys({
				'id': e.value[0][0]
			}).then((res) => {
				for (var i = 0; i < res.data.length; i++) {
					state.filterData[1]['submenu'].push(res.data[i]);
				}

			})
		}
	}

	onLoad(async (options) => {
		getTikuList();
		//console.log(state.filterData);
	});
</script>

<style lang="scss" scoped>
	.page-bg{
		background: url(/static/images/kcgw_bg.png) top center no-repeat;
		background-size: cover;
		margin-top: -20px;
		padding-top: 20px;
	}
	.uni-con{
		margin: 0 15px;
	}
	.uni-row {
	    flex-direction: row;
	}
	.uni-flex {
	    display: flex;
	    flex-direction: row;
	}
	.user-photo{
		width: 4rem;
		margin-right: 10px;
		height: 7rem;
	}
	.chat-box{
		flex: 1 1 0%;
		background: url("/static/images/chat_box.png") center center no-repeat;
		background-size: 100%;
		padding: 20px;
	}
	.my-teacher{
		display: block;
		font-weight: bold;
		font-size: 32rpx;
		margin-bottom: 10px;
		line-height: 48rpx;
	}
	.my-teacher-tip{
		display: block;
		color: #fffeff;
		text-align: right;
	}
	.gw-title{
		border-radius: 40px 40px 0 0;
		.solog{
			color: #c66200;
			display: block;
			font-size: 34rpx;
			text-align: center;
			line-height: 70rpx;
			border-radius: 20px 20px 0 0;
		}
		
	}
	.slot-image{
		display: block;
		margin-right: 10px;
		width: 90px;
		height: 90px;
	}
	.con-body{
		width: 80%;
		height: 80px;
		display: flex;
		flex-direction: column;
		.con-title{
			font-size: 28rpx;
			font-weight: bold;
			padding-left: 10px;
		}
		.con-note{
			font-size: 24rpx;
			color: #999999;
			overflow: hidden;
			padding-left: 10px;
		}
		.con-note2{
			font-size: 24rpx;
			color: #2dcd70;
			overflow: hidden;
			background-color: #e9f5e9;
			padding: 6px;
			text-align: center;
			border-radius: 17px;
		}
		.con-note2:before{
			display: inline;
			width: 10px;
			height: 10px;
			background: url(/static/images/gw-6.png) center center no-repeat;
			background-size: 100%;
		}
	}
	
	
	
	
	
	
	
	.btn-back{
		background: #e9b665;
		margin-bottom: 20px;
		border-radius: 20px;
	}
	.btn-dh{
		background: #ff5160;
		margin-bottom: 20px;
		border-radius: 20px;
	}
	.page-tiele-kc{
		text-align: center; 
		line-height: 48rpx;
		font-size: 38rpx;
		font-weight:bold;
	}
	.uni-common-mt{
		margin-top: 15px
	}
	.uni-padding-wrap{
		padding: 0 15px;
	}
	.vasp_box{
		margin: 0 15px;
	}
	.vasp_title{
		background-color: #da913c;
		font-size: 38rpx;
		line-height: 62rpx;
		color: #ffffff;
		padding: 20px;
		font-weight: bold;
		border-radius: 7px 7px 0 0;
	}
	.vasp_con{
		background-color: #fffbf1;
		color: #753c12;
		text-align:center;
		line-height: 58rpx;
		font-size: 30rpx;
		padding: 20px;
		border-radius: 0 0 7px 7px;
	}
	
	.buy-box {
	  position: absolute;
	  bottom: 0rpx;
	  right: 20rpx;
	  z-index: 2;
	  width: 120rpx;
	  height: 50rpx;
	  background: linear-gradient(90deg, #fe8900, #ff5e00);
	  border-radius: 25rpx;
	  font-size: 24rpx;
	  color: #ffffff;
	}

	.price-unit {
	  margin-right: -4px;
	  color: red;
	  font-size: 36rpx;
	}
	
	.ss-order-card-warp {
		padding: 20rpx;

		.img-box {
			width: 184rpx;
			height: auto;
			border-radius: 10rpx;
			overflow: hidden;

			.order-img {
				width: 184rpx;
				height: auto;
			}
		}

		.box-right {
			flex: 1;
			position: relative;
		}

		.title-text {
			font-size: 30rpx;
			font-weight: 500;
			line-height: 40rpx;
		}
	}

	:deep(.uni-tooltip-popup) {
		background: var(--ui-BG);
	}

	.warning-color {
		color: #faad14;
	}

	.danger-color {
		color: #ff3000;
	}

	.success-color {
		color: #52c41a;
	}

	.info-color {
		color: #999999;
	}
</style>